﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace App.Validate
{
    public class StringTypeValidator : ValidatorAttribute
    {
        public ValidatorEnum ValidatorType { get; set; }

        public StringTypeValidator(string messageTemplate)
            : base(messageTemplate)
        {
        }

        public StringTypeValidator(string messageTemplate, ValidatorEnum validatorType)
            : base(messageTemplate)
        {
            this.ValidatorType = validatorType;
        }

        public override Validator CreateValidator()
        {
            return new StringLengthValidator(this.MessageTemplate, this.ValidatorType);
        }
    }
}
